from flask import Blueprint, jsonify, current_app
from flask_login import login_required # type: ignore
from api.errors import error_response

main_bp = Blueprint('main', __name__)

@main_bp.route('/api/test', methods=['POST'])
@login_required
def test():
    current_app.logger.info('访问测试接口')
    return jsonify({
        'message': '测试接口连接成功'
    })

# 导入路由蓝图
from api.routes.auth import auth_bp
from api.routes.collection import collection_bp
from api.routes.browse import browse_bp

# 导出蓝图
__all__ = ['main_bp', 'auth_bp', 'collection_bp', 'browse_bp'] 